From: Keir Fraser Date: Wed, 26 May 2010 07:09:38 +0000 (+0100) Subject: compat-guest accessor macros do not need address check for hvm guests. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12087 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=48114954f9e539dbdfb1e16b224b4282b27e46db;p=xen.git compat-guest accessor macros do not need address check for hvm guests. Signed-off-by: Tim Deegan --- diff --git a/xen/include/xen/compat.h b/xen/include/xen/compat.h index e662045841..0b8c2c9416 100644 --- a/xen/include/xen/compat.h +++ b/xen/include/xen/compat.h @@ -90,8 +90,9 @@ * Allows use of faster __copy_* functions. */ #define compat_handle_okay(hnd, nr) \ + (paging_mode_external(current->domain) || \ compat_array_access_ok((void *)(full_ptr_t)(hnd).c, (nr), \ - sizeof(**(hnd)._)) + sizeof(**(hnd)._))) #define __copy_to_compat_offset(hnd, off, ptr, nr) ({ \ const typeof(*(ptr)) *_s = (ptr); \